package 字符串;

import java.util.Arrays;

public class EX1 {
    public static void main(String[] args) {
       System.out.println(isOk("tae","atee"));
    }
    public static boolean isOk(String s1,String s2){
        boolean f=false;
        if(s1.length()==s2.length()){
            char[] a1= s1.toCharArray();//将字符串转换为字符数组。
            Arrays.sort(a1);
            char[] a2=s2.toCharArray();
            Arrays.sort(a2);
            f=new String(a1).equals(new String(a2))? true:false;
        }
        //System.out.println(f);
        return f;
    }


    public static void main1(String[] args) {
        int[] n1={1,2,3};
        int[][] n2={{11,22,33},{100,200,300,400}};
        System.out.println(n1);//输出内存地址
        System.out.println(n2);//输出内存地址
        System.out.println(Arrays.toString(n1));//输出一维元素
        System.out.println(Arrays.toString(n2));//输出一维下二维的内存地址
    }
}
